package com.mf.controller;

import com.mf.entity.Description;
import com.mf.service.IDescriptionService;
import com.mf.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 数据字典 前端控制器
 * </p>
 *
 * @author mf
 * @since 2024-05-16
 */
@RestController
@RequestMapping("/stock/description")
@Tag(name="数据字典")
public class DescriptionController {
    @Resource
    private IDescriptionService descriptionService;

    @Operation(summary = "根据id查询对应数据字典")
    @GetMapping("/findDescriptionByKey")
    public Result<List<Description>> findDescriptionById(int pid)
    {
        return Result.success(descriptionService.findDescriptionById(pid));
    }

}
